#version 330 core

in vec2 TexCoords;

uniform float Time;
uniform float Speed;
uniform sampler2D image;
uniform sampler2D imageNoise;
float maskWidth = 20.0;

out vec4 FragColor;

void main()
{
	maskWidth = 100.0 * abs(sin(Time));
	vec2 pixel_num = vec2(textureSize(image, 0) / maskWidth);
	vec2 pixel_uv = floor(TexCoords * pixel_num) / pixel_num;
 
    FragColor = texture2D(image, pixel_uv);
}
